import React, { Component } from 'react';
import VideoItem from './VideoItem';

export default class VideoList extends Component {


  render() {
    let { currentList, keys } = this.props;  // list 对象
    return (
      <div>
        {keys.map((type, i) => {
          return <span key={i} onClick={() => {
            this.props.setCurrentList(i);
          }}>{type}  </span>
        })}


        <ul>
          {
            currentList && currentList.map((v, i) => {
              return <VideoItem item={v} key={i}></VideoItem>
            })
          }
        </ul>

      </div>
    )
  }
}

